import fetch from 'common/src/utils/fetch';

export function getScholarshipInfoByStudentId(data) {
  return fetch({
    url: '/api/majorservice/scholarship/getScholarshipInfoByStudentId/' + data,
    method: 'get',
    headers: {'Content-Type': 'application/json'}
  });
}

//新增
export function addData(data) {
  return fetch({
    url: '/api/majorservice/voluntaryClassLimit/add',
    method: 'post',
    headers: {'Content-Type': 'application/json'},
    data
  });
}

export function exportDataBlack(data) {
  return fetch({
    url: `/api/majorservice/voluntaryClassLimit/importBlack`,
    method: 'post',
    data: data,
    showMask: false
  });
}

export function exportDataWhite(data) {
  return fetch({
    url: `/api/majorservice/voluntaryClassLimit/importWhile`,
    method: 'post',
    data: data,
    showMask: false
  });
}

export function exportData(data) {
  return fetch({
    url: `/api/majorservice/voluntaryClassLimit/exportList`,
    method: 'post',
    data: data,
    showMask: false
  });
}

export function deleteData(id) {
  return fetch({
    url:
      '/api/majorservice/voluntaryClassLimit/delete',
    method: 'delete',
    headers: {'Content-Type': 'application/json'},
    params: {
      id: id
    }
  });
}

export function getReportStatus(key) {
  return fetch({
    url: `/api/majorservice/common/exportExcelResult/${key}`,
    method: 'get'
  });
}

export function findList(data) {
  return fetch({
    url:
      '/api/majorservice/voluntaryClassLimit/listPage',
    method: 'post',
    headers: {'Content-Type': 'application/json'},
    data
  });
}


export function getList(data) {
  return fetch({
    url:
      '/api/majorservice/changeStudentStatus/getList',
    method: 'post',
    headers: {'Content-Type': 'application/json'},
    data
  });
}

export function getChangeList(data) {
  return fetch({
    url: `/api/majorservice/changeStudentStatus/excelList`,
    method: 'post',
    data: data,
    showMask: false
  });
}

//主修专业学籍异动
export function changeStudentStatus(data) {
  return fetch({
    url: '/api/majorservice/changeStudentStatus/changeStudentStatus',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data
  });
}

//异步请求
export function getResultByKey(key) {
  return fetch({
    url: '/api/electionservice/elcResult/findAutoBatchRemove?key=' + key,
    method: 'get'
  });
}
